[Feature] Support CopyPaste for RotatedBoxes#657
[Feature] Support CopyPaste for RotatedBoxes#657nijkah wants to merge 5 commits intoopen-mmlab:devfrom
Conversation
| contours = cv2.findContours(self.masks[idx], cv2.RETR_TREE, | ||
| cv2.CHAIN_APPROX_SIMPLE)[0][0] | ||
| (cx, cy), (w, h), a = cv2.minAreaRect(contours) | ||
| rboxes[idx, :] = np.array( | ||
| [cx, cy, w, h, np.radians(a)], dtype=np.float32) |
There was a problem hiding this comment.
Here, we need to support mmrotate.core.bbox.poly2obb_np for various angle versions.
However, poly2obb supposes that polygons have 4 vertices.
How can we support this?
There was a problem hiding this comment.
In mmrotate1.x, we suppose all rotated boxes use oc angle version during data transforms.
We only need to distinguish different angle versions within the box_head.
So I think it's OK to write like this.
|
Excellent job! It's very useful. |
|
@nijkah Sorry to reply so late. Anyway, I'm back. The project structure of MMDet and mmrotate has been updated. Please update your code according to https://github.com/open-mmlab/mmdetection/blob/3.x/mmdet/structures/mask/structures.py I will continue to pay attention to this important PR and hope your enthusiasm will not fade. |
|
@hongxrsysu I think it works normally after upgrading mmdet >= 2.26.0. Please refer to these links. |
|
@zytx121 The Is there any good way to support both |
Thanks! It works! |
Hi @nijkah! In 1. x, |

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Closes #82
Modification
RBitMasksRCopyPasteWelcome any suggestions on the current implementation!
Example